package com.bm.dao;

import com.bm.pojo.user.User;

import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * Created with IntelliJ IDEA.
 * User: sx
 * Date: 2022/1/23
 * Time: 20:42
 * Description: java
 */
@Repository
public interface Neo4jUserRepository extends Neo4jRepository<User,Long> {

     /*
     * 查询密码和账户
     * */
     @Query("MATCH (p:User {account:{account},passord:{password}}) RETURN p")
     User queryByAccountAndPassword(@Param("account")String account, @Param("password")String password);

     /*
     * 查询账户
     * */
     @Query("match (p:User {account:{account}}) return p")
     User queryByAccount(@Param("account")String account);


//     @Query("match (n:grapeTu)-[r:`产区`]->(p:producingArea) where n.grapeName='紫北塞（Alicante Bouschet）' return n,r,p")



}
